package main;

import mapper.RoleMapper;

import org.apache.ibatis.session.SqlSession;

import pojo.Role;

import utils.SqlSessionFactoryUtils;



public class Main {

	public static void main(String[] args) {
		Logger log=Logger.getLogger(Main.class);
		SqlSession sqlSession=null; 
        try{
        	sqlSession=SqlSessionFactoryUtils.openSqlSession();
        	RoleMapper roleMapper=sqlSession.getMapper(RoleMapper.class);
        	Role role=roleMapper.getRole(1L);
        	log.info(role.getRoleName());
        }finally{
        	if(sqlSession!=null){
        		sqlSession.close();
        	}
        }
	}

}
